Embodiments of the present invention relate generally to searching a corpus of information and more particularly to providing for searching a database using a keyword search in near real time.
Business objects such as orders, invoices, payments, documents, etc., stored in a database or other repository can be searched via applications that use, maintain, or access the information therein. An application that provides for searching records of a business object typically does so through a Structured Query Language (SQL) or similar query against the database. For example, a user can specify through a user interface one or more attributes of the business object to be found. Using the specified attributes, a query can be run against the business object and records containing the specified attributes can be returned or reported to the user.
In other cases, a keyword search can be performed on the contents of the database. For example, an index, e.g., a text index, can be generated based on the contents of the repository and a keyword search can be performed on the contents of the index. However, when the data in the repository is changed, a lag can occur between the time when the data is changed and when that data is available to be searched using such a keyword search. That is, since the change is not propagated to the index at the same time that the data in the repository is changed, a lag is occurs between the data change and its propagation to the index. If a keyword search is performed against the index during this lag time, the change will not be reflected in the results of the keyword search. The lag time can be reduced by frequently updating or re-generating the index. However, this approach reaches a point of impracticality as the update or re-generation of the index begins to compete for the same resources needed to process transaction on the repository. Therefore, updates to or re-generation of the index are typically performed during low demand periods.
As a result, the user is left with inaccurate or incomplete results. Assuming that the user is even aware of this problem, he can retry the keyword search at a later time, after the index is updated or re-generated. However, the user probably is not aware of when this may or may not happen. Alternatively, the user may decide to simply rely on the results of an attribute search, i.e., an SQL or other query against the database or repository. However, this search may not yield the same or even similar results as a keyword search. Hence, there is a need for improved methods and systems for searching a repository of information such as a database using a keyword search and/or an attribute search in near real time.